<extend name="Base/common"/>
<block name="body">
	<div class="container">
		<div class="register">
			<img src="__IMG__/reg_img1.png" alt="" width="100%">
			<div class="reg_bar">
				<p class="phone_num clearfix"><input type="text" placeholder="手机号"></p>
				<p class="reg_pwd clearfix reg_password"><input type="text" placeholder="密码"><input type="password"></p>
				<p class="reg_repwd clearfix reg_password"><input type="text" placeholder="确认密码"><input type="password"></p>
				<p class="reg_code clearfix"><input type="text" placeholder="验证码"><input type="submit" class="btn" value="获取验证码" id="GetCode" ></p>
			</div>
			<span class="msg">请输入正确手机号</span>

			<div class="xieyi"><input type="checkbox">我已阅读并同意<a href="">《用户协议》</a></div>
			<input type="button" value="注册" class="reg_btn">
		</div>
	</div>
<block name="script">
<script type="text/javascript">	
	$(document).ready(function(){
		/*密码框*/
		$(".reg_bar .reg_password").find("input[type='text']").focus(function() {
			var text_value = $(this).val();
		    if (text_value == this.defaultValue) {
		    var obj=$(this).parent(".reg_password")
		    $(this).hide();
		    obj.find("input[type='password']").show().focus();			    
		    }
		});
		$(".reg_bar .reg_password").find("input[type='password']").blur(function() {
		    var text_value = $(this).val();
		    if (text_value == "") {
		    var obj1=$(this).parent(".reg_password")			    
		    $(this).hide();
		    obj1.find("input[type='text']").show();
		    }
		});

		// 获取验证码
		$("#GetCode").click(function(){                               
                setInt();
            })
            var count=60;
            var curCount;
            var objTime;
            function setTime(){ 
                if (curCount==0) {
                    clearInterval(objTime);
                    $('#GetCode').removeAttr('disabled');
                    $('#GetCode').css('background','#cc2a1e');
                    $('#GetCode').val('重发验证码');                    
                }else{  
                    curCount--; 
                    $('#GetCode').val(curCount + "秒后重发")
                }
            }

            function setInt() {
                curCount=count;             
                $('#GetCode').attr('disabled','true');
                $('#GetCode').css('background','#b1b1b1');
                $('#GetCode').val(curCount + "秒后重发")                                                
                objTime=setInterval(setTime,1000);
            }

	})
</script>
</block>

</block>